from fastapi import APIRouter, Depends

from forward.api.admin.schemas.lucky.prize import PrizeAddInSchema, PrizeDeleteInSchema, PrizeDetailInSchema, PrizeEditInSchema, PrizeListInSchema, PrizeStatusInSchema
from forward.api.admin.service.lucky.prize import PrizeService

prize = APIRouter(prefix="/prize")


@prize.post("/lists")
async def list(list_in: PrizeListInSchema, prize_service: PrizeService = Depends()):
    return await prize_service.lists(list_in)


@prize.post("/add")
async def add(add_in: PrizeAddInSchema, prize_service: PrizeService = Depends()):
    return await prize_service.add(add_in)


@prize.post("/delete")
async def delete(delete_in: PrizeDeleteInSchema, prize_service: PrizeService = Depends()):
    return await prize_service.delete(delete_in)


@prize.post("/detail")
async def detail(detail_in: PrizeDetailInSchema, prize_service: PrizeService = Depends()):
    return await prize_service.detail(detail_in)


@prize.post("/edit")
async def edit(edit_in: PrizeEditInSchema, prize_service: PrizeService = Depends()):
    return await prize_service.edit(edit_in)


@prize.post("/status")
async def status(status_in: PrizeStatusInSchema, prize_service: PrizeService = Depends()):
    return await prize_service.status(status_in)
